package jgcp.master;

import jgcp.master.management.TaskDistributor;
import jgcp.master.management.Worker_Task;
import jgcp.master.network.ErrorDetector;
import jgcp.master.network.Server;
import jgcp.master.network.WorkerList;
/**
 * 
 * @Date 31/05/2009
 * @author Jie Zhao (288654)
 * @version 1.0
 */
public class Main {
	public static void main(String[] args) {
		new Thread(new Server()).start();
		new Thread(new UserServer()).start();

		new ErrorDetector().start();	//start communication error detector
		TaskDistributor td = new TaskDistributor();
		
		WorkerList.getInstance().addObserver(Worker_Task.getInstance());
		
		new TaskDistributor().start();	//start task distributor
	}
}
